package org.pinda.gui;

import org.johnnei.engine.render.ColorHelper;

public class MainMenuGui extends Gui {

	private GuiButton btnQuickPlay;
	private GuiButton btnMultiplayer;
	private GuiButton btnSettings;
	private GuiButton btnQuit;
	
	public MainMenuGui(Gui parent) {
		super(parent, 0);
		btnQuickPlay = new GuiButton(this, 200, 120, true, "Quick Play", new ColorHelper(0x33, 0x33, 0x33), null);
		btnMultiplayer = new GuiButton(this, 230, 120, true, "Multiplayer", new ColorHelper(0x33, 0x33, 0x33), null);
		btnSettings = new GuiButton(this, 260, 120, true, "Settings", new ColorHelper(0x33, 0x33, 0x33), null);
		btnQuit = new GuiButton(this, 290, 120, true, "Quit", new ColorHelper(0x33, 0x33, 0x33), null);
		
		addComponent(btnQuickPlay);
		addComponent(btnMultiplayer);
		addComponent(btnSettings);
		addComponent(btnQuit);
	}
	
	@Override
	public void onTick(int deltaMs) {
		super.onTick(deltaMs);
		if(btnQuickPlay.isClicked()) {
			//TODO Start Quickplay
		} else if(btnMultiplayer.isClicked()) {
			switchGui(new MultiplayerBrowserGui(getParent()));
		} else if(btnSettings.isClicked()) {
			//TODO Goto Settings
		} else if(btnQuit.isClicked()) {
			requestClose();
		}
	}

}
